<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Hello WebSocket</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script src="app2.js"></script>
</head>
<body>
<noscript><h2 style="color: #ff0000">Seems your browser doesn't support Javascript! Websocket relies on Javascript being
    enabled. Please enable
    Javascript and reload this page!</h2></noscript>
<div id="main-content" class="container">
    <div class="row">
        <!--按钮-->
        <div class="col-md-4">
            <form class="form-inline">
                <div class="form-group">
                    <label for="connect">WebSocket</label>
                    <button id="connect" class="btn btn-default" type="submit">连接</button>
                    <button id="disconnect" class="btn btn-default" type="submit" disabled="disabled">关闭
                    </button>
                    <input type="file" id="file" >
                    <button id="sendFile">发送文件</button>
                </div>
            </form>
        </div>

        <div class="col-md-4">
            <form id="inputDiv" class="form-inline">
                <div class="form-group">
                    <label for="name">输入消息</label>
                    <input type="text" id="name" class="form-control" placeholder="">
                </div>
                <button id="send" class="btn btn-default" type="submit">发送</button>
            </form>
        </div>

        <div class="col-md-4">
            <form id="loginForm" class="form-inline">
                <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" id="username" class="form-control" placeholder="Your username here...">
                </div>
                <button id="login" class="btn btn-default" type="submit">登录</button>
            </form>
            <div id="usernameDiv">欢迎您, <span id="member" style="color: chocolate"></span></div>
        </div>
    </div>

    <!--消息展示区-->
    <div class="row">
        <div class="col-md-12">
            <table id="conversation" class="table table-striped">
                <thead>
                <tr>
                    <th>Greetings</th>
                </tr>
                </thead>
                <tbody id="greetings">
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
</html>